package com.example.springboot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.springboot.controller.dto.ArticleDTO;
import com.example.springboot.entity.Articles;
import com.example.springboot.mapper.ArticlesMapper;
import com.example.springboot.service.IArticlesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 文章表 服务实现类
 * </p>
 *
 * @author
 *
 */
@Service
public class ArticlesServiceImpl extends ServiceImpl<ArticlesMapper, Articles> implements IArticlesService {

    @Override
    public Page<ArticleDTO> pageWithAuthor(Page<ArticleDTO> pageInfo, QueryWrapper<Articles> queryWrapper) {
        return baseMapper.selectArticlePageWithAuthor(pageInfo, queryWrapper);
    }

    @Override
    public void updateView(Integer categoryId) {
        baseMapper.updateView(categoryId);
    }
}
